package com.fernfx.xingtan.my.model;

import com.fernfx.xingtan.Constant;
import com.fernfx.xingtan.common.network.IRequestCallback;
import com.fernfx.xingtan.common.network.SJJNetworkProxy;
import com.fernfx.xingtan.my.contract.ShowSettingInfoContract;
import com.fernfx.xingtan.utils.FastJsonUtil;

import java.util.Map;

/**
 * Created by admin on 2018/8/14.
 */

public class ShowSettingInfoModel implements ShowSettingInfoContract.Model {
    @Override
    public void request(Map<String, Object> requestArgsMap, IRequestCallback iRequestCallback) {

    }

    @Override
    public void updateNickName(Map<String, Object> requestArgsMap,IRequestCallback iRequestCallback) {
        String requestText = FastJsonUtil.BeanToJson(requestArgsMap);
        SJJNetworkProxy.getInstance().post(Constant.RequestArgs.UPDATE_NICKNAME_URL,null,requestText,iRequestCallback);
    }

    @Override
    public void updateSex(Map<String, Object> requestArgsMap,IRequestCallback iRequestCallback) {
        String requestText = FastJsonUtil.BeanToJson(requestArgsMap);
        SJJNetworkProxy.getInstance().post(Constant.RequestArgs.UPDATE_SEX_URL,null,requestText,iRequestCallback);
    }

    @Override
    public void bussinessCard(Map<String, Object> requestArgsMap,IRequestCallback iRequestCallback) {
        SJJNetworkProxy.getInstance().get(Constant.RequestArgs.BUSSINESS_CARD_URL,null,iRequestCallback);
    }

    @Override
    public void updateAutograph(Map<String, Object> requestArgsMap,IRequestCallback iRequestCallback) {
        String requestText = FastJsonUtil.BeanToJson(requestArgsMap);
        SJJNetworkProxy.getInstance().post(Constant.RequestArgs.SAVE_USER_SIGNATURE_URL,null,requestText,iRequestCallback);
    }
}
